#define D2D_INPUT_COUNT 1
#define D2D_INPUT0_COMPLEX
#define D2D_REQUIRES_SCENE_POSITION
#include "d2d1effecthelpers.hlsli"


//半径
float radius;
//开始位置
float2 position;
//目标位置
float2 targetPosition;
float pressure;
D2D_PS_ENTRY(main) {
    //当前位置
    float4 cPoint = D2DGetInputCoordinate(0);
    //// 计算当前点到目标点距离
    float dist = distance(targetPosition, cPoint);
    if (radius >= dist) {
        
        return float4(1, 0, 0, 1);
    }
    else {
        float4 col = D2DGetInput(0);
        return float4(col.r, 0, 0, 0);
    }
}